package com.example.rmi;

import java.net.MalformedURLException;
import java.rmi.Naming;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;


public class Client {
    public static void main(String[] args) throws RemoteException, NotBoundException, MalformedURLException {
        IService iService= (IService) Naming.lookup("rmi://localhost:8888/r_hello");
        System.out.println(iService.sayHello());
        System.out.println(iService.sayHello("成功啦"));
        HelloImpl.User user= iService.getUser();
        System.out.println((user));
    }
}
